﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using DTO;
using DAO;

namespace BUS
{
    public class MEMBERBUS
    {
        public static bool TonTai_Email(String emailNew)
        {
            return MEMBERDAO.TonTai_Email(emailNew);
        }

        public static bool TonTai_UserName(String userNew)
        {
            return MEMBERDAO.TonTai_UserName(userNew);
        }

        public static MEMBER LayMemberCoID(int idMember)
        {
            return MEMBERDAO.LayMemberCoID(idMember);
        }

        public static MEMBER LayMemberCoEmail(String email)
        {
            return MEMBERDAO.LayMemberCoEmail(email);
        }

        public static MEMBER LayMemberCoUser(String user)
        {
            return MEMBERDAO.LayMemberCoUser(user);
        }

        public static int ThemThanhVien(MEMBER memNew)
        {
            return MEMBERDAO.ThemThanhVien(memNew);
        }

        //tuy
        public static MEMBER[] LayBang()
        {
            return MEMBERDAO.LayBang();
        }

        public static void AddMember(MEMBER mb)
        {
            MEMBERDAO.AddMember(mb);
        }

        //public static MEMBER LayMemberCoID(int idMember)
        //{
        //    return MEMBERDAO.LayMemberCoID(idMember);
        //}

        public static void updateMember(int IDMember, string password, string hoten, string diachi, string dienthoai)
        {
            MEMBERDAO.updateMember(IDMember, password, hoten, diachi, dienthoai);
        }

        public static void deleteMember(int id)
        {
            MEMBERDAO.deleteMember(id);
        }
        public static MEMBER getMemberByEmail(string email)
        {
            return DAO.MEMBERDAO.getMemberByEmail(email);
        }
        public static int getIDByUserName(string user)
        {
            return MEMBERDAO.getIDByUserName(user);
        }
    }
}
